import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:whale/helper/utils/util.dart';

import '../index.dart';


class RiskDataView extends GetView<WatchController> {
  const RiskDataView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {

    var state = controller.state;
    return Container(
      margin: EdgeInsets.only(top: 20.r),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            '风险监测',
            style: TextStyle(
              color: ColorsUtil.title,
              fontSize: 16.sp,
              fontWeight: FontWeight.bold
            ),
          ),
          SizedBox(height: 15.r,),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Container(
                width: 165.r,
                height: 188.r,
                decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(4.r),
                    image: DecorationImage(image: AssetImage('bg_home1.png'.imgPathHome),fit: BoxFit.fill)
                ),
                padding: EdgeInsets.fromLTRB(15.r,18.r,0,12.r),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: [
                        Text('政策措施',style: TextStyle(color: Colors.white,fontSize: 14.r,fontWeight: FontWeight.bold),),
                        Spacer(),
                        Text('（篇）',style: TextStyle(color: Colors.white,fontSize: 10.r),),
                        SizedBox(width: 10.r,),
                      ],
                    ),
                    SizedBox(height: 8.r,),
                    Text('6,018',style: TextStyle(color: Colors.white,fontSize: 30.r,fontWeight: FontWeight.bold),),
                    Container(
                      width: 1.sw,
                      height: 0.5.r,
                      margin: EdgeInsets.only(top: 10.r,bottom: 10.r),
                      color: Colors.white,
                    ),
                    Row(
                      children: [
                        Text('新增文件',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                    SizedBox(height: 10.r,),
                    Row(
                      children: [
                        Text('已审查文件数',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                    SizedBox(height: 10.r,),
                    Row(
                      children: [
                        Text('意思违规文件数',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                  ],
                ),
              ),
              Container(
                width: 165.r,
                height: 188.r,
                decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(4.r),
                    image: DecorationImage(image: AssetImage('bg_home2.png'.imgPathHome),fit: BoxFit.fill)
                ),
                padding: EdgeInsets.fromLTRB(15.r,18.r,0,12.r),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: [
                        Text('招标采购',style: TextStyle(color: Colors.white,fontSize: 14.r,fontWeight: FontWeight.bold),),
                        Spacer(),
                        Text('（篇）',style: TextStyle(color: Colors.white,fontSize: 10.r),),
                        SizedBox(width: 10.r,),
                      ],
                    ),
                    SizedBox(height: 8.r,),
                    Text('32,018',style: TextStyle(color: Colors.white,fontSize: 30.r,fontWeight: FontWeight.bold),),
                    Container(
                      width: 1.sw,
                      height: 0.5.r,
                      margin: EdgeInsets.only(top: 10.r,bottom: 10.r),
                      color: Colors.white,
                    ),
                    Row(
                      children: [
                        Text('新增文件',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                    SizedBox(height: 10.r,),
                    Row(
                      children: [
                        Text('已审查文件数',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                    SizedBox(height: 10.r,),
                    Row(
                      children: [
                        Text('疑似违规文件数',style: TextStyle(color: Colors.white,fontSize: 12.r),),
                        Spacer(),
                        Text('400',style: TextStyle(color: Colors.white,fontSize: 12.r,fontWeight: FontWeight.w500),),
                        SizedBox(width: 15.r,),
                      ],
                    ),
                  ],
                ),
              ),
            ],
          )
        ],
      ),
    );
  }
}